import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
import { Length } from 'class-validator';

@Entity()
export class Project {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  userid: number; // 用户ID

  @Column({
    length: 80
  })
  @Length(4, 80)
  userNickname: string;

  @Column({
    length: 80
  })
  @Length(4, 80)
  title: string;

  @Column({
    nullable: true,
  })
  staticFiles: 'text'; // 静态资源目录

  @Column()
  createdTime: Date;
}